import java.util.Scanner;

public class zy {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int a = sc.nextInt();
        System.out.println("请输入另外一个整数");
        int b = sc.nextInt();
        int c = a+b;
        System.out.println("请输入最小范围");
        int min = sc.nextInt();
        System.out.println("请输入最大范围");
        int max = sc.nextInt();
        if(c>=max||c<=min){
            try {
                throw new Exception("超出范围");
            } catch (Exception e) {
                System.out.println(e);;
            }
        }else{
            System.out.println("他们的和是"+c);
        }

    }
}